package com.dk.service.impl;

import com.dk.pojo.LimitedSpecial;
import com.dk.mapper.LimitedSpecialMapper;
import com.dk.pojo.LimitedSpecialVO;
import com.dk.service.LimitedSpecialService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 帅杰
 * @since 2021-08-12
 */
@Service
public class LimitedSpecialServiceImpl extends ServiceImpl<LimitedSpecialMapper, LimitedSpecial> implements LimitedSpecialService {

    @Autowired
    private LimitedSpecialMapper limitedSpecialMapper;

    //新增
    @Override
    public void toInsert(LimitedSpecial limitedSpecial) {
        //前台不可见 通过审核之后才能可见
        limitedSpecial.setStute("0");
        limitedSpecialMapper.insert(limitedSpecial);
    }
    //查询
    @Override
    public List<LimitedSpecialVO> toSelect(Long messageId) {
        //
        return limitedSpecialMapper.toSelect(messageId);
    }
}
